package util.mycomponents
{
	import flash.events.MouseEvent;
	
	import mx.controls.Button;
	import mx.controls.LinkBar;
	import mx.events.FlexEvent;
	
	public class MyLinkBar extends LinkBar
	{
		public function MyLinkBar()
		{
			super();
		}
		override protected function clickHandler(event:MouseEvent):void
		{
			var index:int = getChildIndex(Button(event.currentTarget));
			
			if (index == selectedIndex)
				hiliteSelectedNavItem(-1);
			else
				hiliteSelectedNavItem(index);
			
			super.clickHandler(event);
		}
	}
}